package com.example.common.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "基础请求")
public class BaseReq implements Serializable {

    @NotNull(message = "reqNo can not be null")
    @Schema(description = "请求流水号")
    private String reqNo = UUID.randomUUID().toString().replace("-", "");

    @Schema(description = "请求时间")
    private Date reqDate;

    @Schema(description = "自增序列")
    private Long id;

    @Schema(description = "语言code")
    private String langCode;
}
